package com.example.activity;

import com.example.smart_home.R;
import com.example.util.DataImlUtils;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.Window;
import android.widget.EditText;
import android.widget.GridView;
import android.widget.ImageView;
import android.widget.SimpleAdapter;
import android.widget.TextView;

public class DefineSceneNameActivity extends Activity implements OnClickListener{
	private TextView scenename_save;
	private EditText scene_name;
	private ImageView btnBack;
	/*private GridView img_scene;*/
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		setContentView(R.layout.define_scenename);
		
		scene_name = (EditText)this.findViewById(R.id.scene_name);
		btnBack = (ImageView)this.findViewById(R.id.btnBack);
		scenename_save = (TextView)this.findViewById(R.id.scenename_save);
		/*img_scene = (GridView)this.findViewById(R.id.img_scene);*/
		btnBack.setOnClickListener(this);
		
		/*SimpleAdapter simpleAdapter = new SimpleAdapter
				(getApplicationContext(), DataImlUtils.getSceneImg(), R.layout.scene_gridview_item, new String[]{"img_scene"}, new int[]{R.id.img_scene});
		img_scene.setAdapter(simpleAdapter);*/	
	}
	
	

	@Override
	public void onClick(View v) {
		// TODO Auto-generated method stub
		switch(v.getId()){
		case R.id.btnBack:
			DefineSceneNameActivity.this.finish();
			break;
		case R.id.scenename_save:
			Intent intent = new Intent(DefineSceneNameActivity.this,DefineSceneActivity.class);
			startActivity(intent);
			break;
		
		}
	}

}
